package dpll.ast;

import dpll.fnc.IVisitor;

public class NodoBooleano extends ASTNode {

	private boolean valor;

	public NodoBooleano(String valor) {
		if (valor.toLowerCase().indexOf("true") == 0)
			this.valor = true;
		else
			this.valor = false;
	}

	public boolean getValor() {
		return valor;
	}

	@Override
	public <T> T accept(IVisitor<T> visitor) {
		return visitor.visitBooleano(this);
	}

	@Override
	public String toString() {
		return "(BOOLEANO " + String.valueOf(valor) + ")";
	}

}
